package ch1;

import java.util.Scanner;

public class Zuoye030810 {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        System.out.println("请输入任意一个整数：");
        int a=scan.nextInt();
        int c=0;
        while (a!=0) {
            c=c+a%10;
            a=a/10;
        }
        System.out.println(c);


    }
}
